package com.fp.helig.Res;

import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.ui.activity.BaseGameActivity;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

import android.util.Log;


@Root
public class ObjectParams {

	@Element
	public String mName;
	@Element
	public int mBodyType=BOX_BODY;
	@Element
	public float mDensity=3.0f;
	@Element
	public float mElasticity=0.5f;
	@Element
	public float mFriction=0.5f;
	
	@Element
	public String mTextureName;
	@Element
	public int mTextureSizeX=256;
	@Element
	public int mTextureSizeY=256;
	@Element
	public int mTextureX=1;
	@Element
	public int mTextureY=1;
	@Element
	public float mSizeModifer=0.25f;

	
	public Textures mTexture;
	
	public void LoadTexture(final BaseGameActivity activity, final Engine engine){
		Log.v("Start Load", mTextureName+"Sx"+String.valueOf(mTextureSizeX )+"Syx"+String.valueOf(mTextureSizeY )+"xx"+String.valueOf(mTextureX )+"yx"+String.valueOf(mTextureY ));
		mTexture = new Textures(activity, engine,mTextureSizeX,mTextureSizeY,mTextureName,mTextureX,mTextureY);
		Log.v("End Load", mTextureName);
	}
	
	public static final int BOX_BODY =1;
	
	public static final int CIRCLE_BODY =2;
	
//	public ObjectParams(int pBodyType, float pDensity, float pElasticity, float pFriction,
//							int pTextureSize,float pSizeModifer,Textures pTexture,String pName){
//		
//		mBodyType=pBodyType;
//		mDensity=pDensity;
//		mElasticity=pElasticity;
//		 mFriction=pFriction;
//		 mTextureSize=pTextureSize;
//		mSizeModifer=pSizeModifer;
//		mTexture=pTexture;
//		mName=pName;
//	}
	
}
